package com.tenoz.display
{
	import flash.display.Graphics;
	import flash.display.Sprite;

	public class Board extends Sprite
	{
		protected var size:int = 25;
		protected var grid:Array = [];
		
		public function Board()
		{
			var h:int = 0;
			var v:int = 0;
			graphics.lineStyle(1,0);
			graphics.drawRect(0,0,8*size,8*size);
			graphics.beginFill(0);
			for(v; v<8; v++)
			{
				grid[v] = [];
				for(h=0; h<8; h++)
				{
					grid[v][h] = new Square(v+h & 1);
				}
				if(v&1)
				{
					graphics.drawRect(v*size, 0, size, size*8);
				}
				else
				{
					graphics.drawRect(0, v*size, size*8, size);
				}
			}
		}
	}
}